package com.scalar.chiptrack.rma.forms;


import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;


/**
 * Form bean for the rma page.  This form has the following fields,
 * with default values in square brackets:
 *
 * @author Mallikarjun Ankati
 * @version $Revision: 1.1.1.1 $ $Date: 2006/12/11 23:43:16 $
 */

public final class RMAListForm extends ChipTrackActionForm {


    // --------------------------------------------------- Instance Variables


    /**
     * The customer name.
     */
    private String customerName = null;
    private String rmaNumber = null;
    //Added by KumaraSwamy on 13 Sep, 2004.
    private String rmaStatus = null;

    // ----------------------------------------------------------- Properties


    /**
     * @return customerName
     */
    public String getCustomerName() {

	return (this.customerName);

    }


    /**
     * Set the customername
     *
     * @param customerName
     */
    public void setCustomerName(String customerName) {

        this.customerName = customerName;

    }

    /**
     * @return rmaNumber
     */
    public String getRmaNumber() {
		return (this.rmaNumber);
    }

    /**
         * @return rmaStatus
         */
    public String getRmaStatus() {
        return (this.rmaStatus);
    }

    /**
     * Set the rmaNumber
     *
     * @param rmaNumber
     */
    public void setRmaNumber(String rmaNumber) {

        this.rmaNumber = rmaNumber;

    }

    /**
     * Set the rmaStatus
     *
     * @param rmaStatus
     */
    public void setRmaStatus(String rmaStatus) {

        this.rmaStatus = rmaStatus;

    }
    // --------------------------------------------------------- Public Methods


    /**
     * Reset all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {

        this.customerName = null;
		this.rmaNumber = null;
    }


    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an <code>ActionErrors</code> object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * <code>null</code> or an <code>ActionErrors</code> object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
        //if ((customerName == null) || (vendorName.length() < 1))
        //    errors.add("Vendor", new ActionError("error.vendor name.required"));

        return errors;

    }

}
